﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/AdminPage.master" AutoEventWireup="true" CodeFile="City_Update.aspx.cs" Inherits="UpdateCity" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <script type="text/javascript">
    function ShowMessage() {
        alert('Update City successful!');
        window.location.href = 'City_Management.aspx';

    }
    function check() {
        alert('This city name has been exist!');
    }

</script>
<table class="style3" align="center" >
        <tr>
            <td colspan="3" style="background-image: url(../images/bg_head.png); height: 30px" 
                class="style3">

                <asp:Label ID="Label1" runat="server" ForeColor="White" Text="Update City" 
                    Font-Bold="True" ></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style6" style="width: 12%">
                &nbsp;</td>
            <td class="style6">
                City ID</td>
            <td>
                <asp:Label ID="lblCID" runat="server" style="font-weight: 700" Text="lblCID"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style6" style="width: 12%">
                &nbsp;</td>
            <td class="style6">
                City Name</td>
            <td>
                <asp:TextBox ID="txtCName" runat="server" Width="170px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvCName" runat="server" 
                    ControlToValidate="txtCName" CssClass="style8" 
                    ErrorMessage="City name can not be blank" Font-Bold="False" Font-Size="Large" 
                    ForeColor="Red">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style6" style="width: 12%">
                &nbsp;</td>
            <td class="style6">
                Zip Code</td>
            <td>
                <asp:TextBox ID="txtZipCode" runat="server" Width="170px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvZipCode" runat="server" 
                    ControlToValidate="txtZipCode" CssClass="style8" 
                    ErrorMessage="ZIP code can not be blank" Font-Bold="False" Font-Size="Large" 
                    ForeColor="Red">*</asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="revZipCode" runat="server" 
                    ControlToValidate="txtZipCode" ErrorMessage="Zip Code contains 5 digits only" 
                    Font-Size="Large" ForeColor="Red" ValidationExpression="\d{5}">*</asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="style6" style="width: 12%; height: 64px;">
                </td>
            <td class="style6" colspan="2" style="height: 64px">
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" />
            </td>
        </tr>
        <tr>
            <td class="style6" style="width: 12%">
                &nbsp;</td>
            <td class="style7">
                <asp:ImageButton ID="imgbUpdate" runat="server" 
                    ImageUrl="~/images/img_Update.png" onclick="imgbUpdate_Click" />
            </td>
            <td>
                <asp:ImageButton ID="imgbReset" runat="server" 
                    ImageUrl="~/images/img_Reset.png" onclick="imgbReset_Click" 
                    CausesValidation="False" />
                <asp:ImageButton ID="imgbBack" runat="server" 
                    ImageUrl="~/images/img_Back.png" onclick="imgbBack_Click" 
                    CausesValidation="False" />
            </td>
        </tr>
        </table>
</asp:Content>

